package com.lanou.demo.backgrounddemo.mapper;

import com.lanou.entity.entity.ContentCategoryEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by 常宏盛
 * Date: 2019/7/12 14:49
 **/
public interface ContentCategoryMapper {

    List<ContentCategoryEntity> list(Long parentId);

    int updateIsParentEqualsOne(Long parentId);

    int create(ContentCategoryEntity contentCategoryEntity);

    void update(@Param("id") Long id, @Param("name") String name);

    int delete(Long id);

    Long selectParentIdById(Long id);

    int selectParentIdCount(Long parentId);

    int updateIsParentEqualsZero(Long parentId);

}
